#include "stdafx.h"
#include "modelmaterial.h"

namespace GLC {

CModelMaterial::CModelMaterial()
:_twoSided(false)
{
}

PhongMaterial & CModelMaterial::GetMaterial()
{
    return _material;
}

PhongMaterial const& CModelMaterial::GetMaterial()const
{
    return _material;
}

TextureMap & CModelMaterial::AddTextureMap1(Texture2DRef texture)
{
    _textureMap1.AttachTexture(texture);
    return _textureMap1;
}

bool CModelMaterial::HasTextureMap1()const
{
    return _textureMap1.IsLoaded();
}

TextureMap const& CModelMaterial::GetTextureMap1()const
{
    return _textureMap1;
}

TextureMap & CModelMaterial::GetTextureMap1()
{
    return _textureMap1;
}

bool CModelMaterial::IsTwoSided()const
{
    return _twoSided;
}

void CModelMaterial::SetTwoSided(bool value)
{
    _twoSided = value;
}

} // namespace GLC
